package com.xmutca.sso.common;

import com.xmutca.sso.api.Account;

import java.io.Serializable;

/**
 * @author: 彭伟煌(pengweihuang@xmutca.com)
 * @create: 2016-08-08 17:06
 */
public class Principal implements Serializable {

    private String id;

    private String username;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public Principal(Account account) {
        this.id = account.getId();
        this.username = account.getUsername();
    }

    @Override
    public String toString() {
        return id.toString();
    }
}
